﻿<%@ Page Language="vb" AutoEventWireup="false" Codebehind="ProceedPlanSP_ExtendForm.aspx.vb" Inherits="PubProject.ProceedPlanSP_ExtendForm" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
  <HEAD>
		<title></title>
		<meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR">
		<meta content="Visual Basic .NET 7.1" name="CODE_LANGUAGE">
		<meta content="JavaScript" name="vs_defaultClientScript">
		<meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
		<script language="javascript" src="/_common/scripts/global.js"></script>
		<script language="javascript" src="/_controls/settings.aspx"></script>
		<script language="javascript" src="/_controls/util/util.js"></script>
		<script language="javascript" src="/_controls/number/number.js"></script>
		<script language="javascript" src="/_controls/datetime/date.js"></script>
		<script language="javascript" src="/MyWorkflow/Workflow.js"></script>
		<script language="javascript" src="/MyWorkflow/Blank.js"></script>
		<script language="javascript" src="/PubProject/js/Public.js"></script>
		<style> 
				body{font-size:9pt;}
				table{font-size:9pt;}
				P{font-size:9pt;}
		</style>
		<LINK href="/MyWorkflow/css/form.css" type="text/css" rel="stylesheet">
		<script language="javascript">
			/*------------------------------------------------------------------*/
			//表单接口函数，需扩展
			//1、Fill	--	表单填充
			//2、GetXML --	表单取数
			//3、Valid	--	表单校验
			/*------------------------------------------------------------------*/
			//屏避右键
			function document.oncontextmenu()
			{
				var s = event.srcElement.tagName;
				if (s && s != "INPUT" && s != "TEXTAREA" || event.srcElement.disabled || document.selection.createRange().text.length == 0)
				{
					event.returnValue = false;
				}
			}
			//功能：表单填充
			//editableDomainList	当前步骤可编辑域
			//invisibleDomainList   当前步骤不可见域
			//domainXML				域XML
			function Fill(editableDomainList,invisibleDomainList,domainXML)
			{
				var strBusinessType;
				var xmlDom = new ActiveXObject("Microsoft.XMLDOM"); 
				if (domainXML && domainXML.length>0)	
				{		
					xmlDom.async=false; 
					xmlDom.loadXML(domainXML);					
					if(xmlDom.parseError.errorCode != 0) 
					{						
					    xmlDom = null; 
					}						
				}
				else
				{
					xmlDom = null;
				} 
				
				if (xmlDom.selectSingleNode("/BusinessType/Item/Domain[@name='年度预算计划2部门GUID']"))
				{
					Form1.YearPlan2ObjectGUID.value = xmlDom.selectSingleNode("/BusinessType/Item/Domain[@name='年度预算计划2部门GUID']").text 
					Form1.ObjectGUID.value = xmlDom.selectSingleNode("/BusinessType/Item/Domain[@name='部门GUID']").text 
					Form1.SQDept.value = xmlDom.selectSingleNode("/BusinessType/Item/Domain[@name='申请部门']").text 
					Form1.Year.value = xmlDom.selectSingleNode("/BusinessType/Item/Domain[@name='年度']").text
					Form1.txtReportAmount.value = xmlDom.selectSingleNode("/BusinessType/Item/Domain[@name='上报金额']").text
					Form1.ReportedBy.value = xmlDom.selectSingleNode("/BusinessType/Item/Domain[@name='上报人名称']").text 
					Form1.ReportDate.value = xmlDom.selectSingleNode("/BusinessType/Item/Domain[@name='上报日期']").text	
				    Form1.State.value = xmlDom.selectSingleNode("/BusinessType/Item/Domain[@name='状态']").text
	
				    //判断是否历史流程，如果是历史流程则隐藏列表
					var handleType = xmlDom.documentElement.getAttribute("IsHistory")
					
					if(handleType == 1)
					{
					     Form1.IsHistory.value = "1";
					}
					else
					{
					     Form1.IsHistory.value = "0";
					}
					var sPath = "/Qmys/FYYS/ProceedPlan_Workflow.aspx?mode=3&YearPlan2ObjectGUID=" + Form1.YearPlan2ObjectGUID.value;				
    			    document.all["ifrmeProceedPlan"].src = sPath ;
				}				
			}			
			
			//功能：表单取数
			//参数：取值前的domainxml
			//返回值 取值后的domainxml
			function GetXML(domainXML)
			{
				var xmlDom = new ActiveXObject("Microsoft.XMLDOM");
				 
				xmlDom.async=false;
				xmlDom.loadXML(domainXML);
						
				if(xmlDom.parseError.errorCode != 0) 
				{
				    return "";
				}				
				xmlDom.selectSingleNode("/BusinessType/Item/Domain[@name='年度预算计划2部门GUID']").text = Form1.YearPlan2ObjectGUID.value;
				xmlDom.selectSingleNode("/BusinessType/Item/Domain[@name='部门GUID']").text = Form1.ObjectGUID.value;
				xmlDom.selectSingleNode("/BusinessType/Item/Domain[@name='申请部门']").text = Form1.SQDept.value;
				xmlDom.selectSingleNode("/BusinessType/Item/Domain[@name='年度']").text = Form1.Year.value;
				xmlDom.selectSingleNode("/BusinessType/Item/Domain[@name='上报金额']").text = Form1.txtReportAmount.value;
				xmlDom.selectSingleNode("/BusinessType/Item/Domain[@name='上报人名称']").text = Form1.ReportedBy.value;
				xmlDom.selectSingleNode("/BusinessType/Item/Domain[@name='上报日期']").text = Form1.ReportDate.value;		
				xmlDom.selectSingleNode("/BusinessType/Item/Domain[@name='状态']").text = Form1.State.value;			
				return xmlDom.xml;	
			}
			
			//功能：表单校验
			//参数：可编辑域列表
			function Valid(editableDomainList)
			{
				return true;				
			}
			
		</script>
	</HEAD>
	<body MS_POSITIONING="GridLayout" style="overflow:auto">
		<form id="Form1" method="post" runat="server">
			<asp:textbox id="YearPlan2ObjectGUID" runat="server" style="display:none"></asp:textbox>
			<asp:textbox id="ObjectGUID" runat="server" style="display:none"></asp:textbox>
			<asp:textbox id="SQDept" runat="server" style="display:none"></asp:textbox>
			<asp:textbox id="Year" runat="server" style="display:none"></asp:textbox>
			<asp:textbox id="ItemState" runat="server" style="display:none"></asp:textbox>
			<asp:textbox id="ApproveState" runat="server" style="display:none"></asp:textbox>
			<asp:textbox id="txtReportAmount" runat="server" style="display:none"></asp:textbox>
			<asp:textbox id="ReportedBy" runat="server" style="display:none"></asp:textbox>
			<asp:textbox id="ReportDate" runat="server" style="display:none"></asp:textbox>
			<asp:textbox id="State" runat="server" style="display:none"></asp:textbox>
			<asp:textbox id="IsHistory" runat="server" style="display:none"></asp:textbox>
			<TABLE width="100%" height="100%">
			<TBODY>
				<TR heigth="20">
					<TD><!-- 表单 -->
						<P align="center" id="pTitle"><FONT style="FONT-SIZE: 16px"><STRONG>部门费用年度预算审批单</STRONG></FONT></P>							
					</TD>
				</TR>
				<TR height="10">
					<TD></TD>
				</TR>
				<TR height="100%">
					<TD >
						<iframe src="" id="ifrmeProceedPlan" frameborder="no" height="100%" width="100%" scrolling="auto"></iframe>
					</TD>
				</TR>
			</TBODY>
		</TABLE>
		</form>
	</body>
</html>
